package com.song.storm_demo.wordcount_01;

import backtype.storm.Config;
import backtype.storm.LocalCluster;
import backtype.storm.topology.TopologyBuilder;
import clojure.main;

public class WordCountMain {

	
	public static void main(String[] args)
	{
		TopologyBuilder builder = new TopologyBuilder();
		builder.setSpout("word-reader", new WordReader());
		builder.setBolt("word-spilter", new WordSpliter()).shuffleGrouping("word-reader");
		builder.setBolt("word-counter", new WordCouter()).shuffleGrouping("word-spilter");
		Config conf = new Config();
		conf.put("INPUT_PATH","D:/data/data");
		conf.setDebug(false);
		LocalCluster cluster  =new LocalCluster();
		cluster.submitTopology("word-count", conf, builder.createTopology());
		
		
	}
	
}
